package com.shop.mapper;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shop.pojo.vo.ItemCommentVo;
import com.shop.pojo.vo.SearchItemVo;
import com.shop.pojo.vo.ShopCartVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 商品表 商品信息相关表：分类表，商品图片表，商品规格表，商品参数表 Mapper 接口
 * </p>
 *
 * @author Administrator
 * @since 2020-10-31
 */
@Mapper
public interface ItemsMapperCustom {
    public IPage<ItemCommentVo> queryItemCommentsList(@Param("paramsMap") Map map, Page page);

    public IPage<SearchItemVo> searchItem(@Param("paramsMap") Map map, Page page);

    public IPage<SearchItemVo> searchItemByThirdCat(@Param("paramsMap") Map map, Page page);

    public List<ShopCartVo> queryItemsBySpecIds(@Param("paramsList")List<String> list);

    public void decreaseItemSpecStock(@Param("specId") String specId,@Param("pendingCounts") Integer pendingCount);
}
